package com.lin.setting.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lin.setting.entity.SysUser;
import com.lin.setting.setting.type.TestTypeHandler;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

/**
 * @作者: 林江
 * @创建时间: 2024/4/29
 * @功能:
 */
@Mapper
public interface SysUserDao extends BaseMapper<SysUser> {

    @Select("select * from sys_user")
    @Result(column = "password", property = "password", typeHandler = TestTypeHandler.class)
    public List<Map> getInfo();

    @Insert("insert into sys_user(username,password) values (#{username},#{password,typeHandler=com.lin.setting.setting.handler.TestTypeHandler})")
    void insert(@Param("username") String username, @Param("password") String password);

}
